package com.example.programming.sys.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.programming.sys.entity.EduCourse;
import com.example.programming.sys.entity.vo.CourseWebVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口 chrimer
 * </p>
 *
 * @author chrimer
 * @since 2020-09-07
 */
public interface EduCourseMapper extends BaseMapper<EduCourse> {
    @Select("Select title,lesson_num,cover FROM edu_course WHERE title = #{coursename}")
    public List<EduCourse> getCourseByName(@Param("courseName") QueryWrapper<EduCourse> queryWrapper);

    @Select("Select * FROM edu_course")
    List<EduCourse> getCourse();

    CourseWebVo selectInfoWebById(String courseId);

}
